package com.qf.usefull.dict.service.impl;

import com.qf.usefull.dict.entity.Word;
import com.qf.usefull.dict.service.MyDictionary;

/**
 * 写一个抽象的父类
 */
public abstract class AbstractMyDictImpl implements MyDictionary {

    private Word[] arr = new Word[1000];

    private Word word; // 存储单词的链表

    private Word index; // 链表指针,始终指向链表最后

    private int count = 0;

    public void setCount(int count) {
        this.count = count;
    }

    public AbstractMyDictImpl() {
    }

    public AbstractMyDictImpl(int capacity) {
        arr = new Word[capacity];
    }

    public Word getWord() {
        return word;
    }

    public void setWord(Word word) {
        this.word = word;
    }

    public Word getIndex() {
        return index;
    }

    public void setIndex(Word index) {
        this.index = index;
    }

    public Word[] getArr() {
        return arr;
    }

    public int getCount() {
        return count;
    }

}
